package com.sfr.efrontmobile.domain;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.validation.constraints.Min;
import javax.persistence.ManyToOne;
import com.sfr.efrontmobile.reference.TypeErreur;
import javax.persistence.Enumerated;

@RooJavaBean
@RooToString
@RooJpaActiveRecord(sequenceName = "LOG_SEQ", finders = { "findLogsByResponse", "findLogsBySendRemindersAndPoidsLessThan", "findLogsByTypeAndNameLike" })
public class Log {

    /**
     */
    @NotNull
    private boolean sendReminders;

    /**
     */
    @NotNull
    @Size(min = 1)
    private String name;

    /**
     */
    @NotNull
    @Min(0L)
    private Float poids;

    /**
     */
    @ManyToOne
    private Response response;

    /**
     */
    @NotNull
    @Enumerated
    private TypeErreur type;
}
